import type { LoginInfo } from '@/store/user';
import request from '@/utils/request';

export const loginService = async (params: {
  username: string;
  password: string;
}) => {
  const r = await request.post<LoginInfo>('user/login', params).then((r) => {
    return r;
  });
  return r;
};
